﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <!--BEGIN LISTBOX-->
    <Style TargetType="{x:Type ListBoxItem}">
        <Setter Property="TextElement.FontFamily" Value="Tahoma"/>
        <Setter Property="TextElement.FontSize" Value="11"/>
        <Setter Property="TextElement.FontWeight" Value="Normal"/>
        <Setter Property="TextElement.FontStyle" Value="Normal"/>
        <Setter Property="TextElement.Foreground" Value="{DynamicResource BrushListBoxForeground}"/>
        <Setter Property="UIElement.SnapsToDevicePixels" Value="True"/>
        <Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True"/>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Border" SnapsToDevicePixels="True" Padding="8,1,0,1">
                        <ContentPresenter ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Content="{TemplateBinding ContentControl.Content}" />

                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Panel.Background" TargetName="Border" Value="{DynamicResource BrushListBoxItemBackgroundHighlighted}"/>
                            <Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource BrushListBoxItemForegroundHighlighted}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Panel.Background" TargetName="Border" Value="{DynamicResource BrushListBoxItemBackgroundHighlighted}"/>
                            <Setter Property="TextElement.Foreground" TargetName="Border" Value="{DynamicResource BrushListBoxItemForegroundHighlighted}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource BrushListBoxForegroundDisabled}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ListBox}">
        <Setter Property="Background" Value="{DynamicResource BrushListBoxBackground}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource BrushListBoxBorder}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Width" Value="200" />
        <Setter Property="Height" Value="200" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Border x:Name="Border" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1">
                        <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="Auto" Height="Auto">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="Border" Value="{DynamicResource BrushListBoxBackgroundDisabled}"/>
                            <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource BrushListBoxBorderDisabled}"/>
                            <Setter Property="Foreground" Value="{DynamicResource BrushListBoxForegroundDisabled}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--END LISTBOX-->
</ResourceDictionary>

